///////////////////////////////////////////////////////
//                                                   //
//          soundfxembedwindowsmedia.js              // 
//                                                   //
///////////////////////////////////////////////////////
//
// This JS contains code that writes 
// an object tag for the RealPlayer
// activeX control that is used for
// playing the strike/letter sound 
// effects.
//
// To use this file, place a script
// tag in the body of the document,
// with the src attribute pointing 
// to this file.  Example:
//
// <body onLoad="LMSInitialize();" onUnload="LMSFinished();">
// <Script src="../soundfxembedwindowsmedia.js">
// </Script>
//
// Then whenever you want to play
// a sound effect, call the function
// playStrike() or playLetter().
// That's it.

function playStrike()
{
	G2_stop('FX_SOUND_CLIP');
	G2_setSourcePlay('FX_SOUND_CLIP',STRIKE);
}

function playLetter()
{
	G2_stop('FX_SOUND_CLIP');
	G2_setSourcePlay('FX_SOUND_CLIP',LETTER);
}

window.playStrike = playStrike;
window.playLetter = playLetter;

document.writeln("<OBJECT name='FX_SOUND_CLIP' WIDTH='0' HEIGHT='0' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'><PARAM NAME='FileName' VALUE='" + STRIKE + "'><PARAM NAME='ShowControls' VALUE='0'><PARAM NAME='ShowStatusBar' VALUE='0'><PARAM NAME='ShowDisplay' VALUE='0'><PARAM NAME='DefaultFrame' VALUE='Slide'><PARAM NAME='Autostart' VALUE='0'><Embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/download/default.asp' src='" + STRIKE + "' Name='FX_SOUND_CLIP' Autostart='0' ShowControls='0' ShowDisplay='0' ShowStatusBar='1' DefaultFrame='Slide' width='0' height='0'></embed></OBJECT>");


